<template>
  <div>
    <el-card class="box-card" shadow="always">
    <div class="header">
      <el-page-header @back="goBack">返回</el-page-header>
      <p>任务速达</p>
      <span class="span">发起人:小明</span>
    </div>
    <div class="content">
       <ul>
         <li  @click="changeTab(0)" :class="{ active: selectedTab === 0 }">概览区</li>
         <li  @click="changeTab(1)" :class="{ active: selectedTab === 1 }">填报区</li>
         <li  @click="changeTab(2)" :class="{ active: selectedTab === 2 }">意见区</li>
       </ul>
    </div>
  </el-card>
    <!-- 内容区 -->
      <div v-show="this.selectedTab === 0">
         <Card></Card>
      </div>

       <el-card v-show="this.selectedTab === 1">
        <!-- <p>这是填报区的内容</p> -->
          <Table></Table>
       </el-card>

       <el-card v-show="this.selectedTab === 2">
        <p>这是意见区的内容</p>
       </el-card>

  </div>
</template>

<script>
import Card from "@/pages/components/card.vue";
import Table from "@/pages/components/table.vue"
  export default {
    components:{
      Card,
      Table
    },
    data() {
      return {
        selectedTab: 0,
        itemList:[
          {
            num:25,
            title:"任务书汇总",
            color:'#59C4C4'
          },
          {
            num:15,
            title:"完结任务",
            color:'#93D2F3'
          },
          {
            num:10,
            title:"未完结任务",
            color:'#F4CE98'
          },
          {
            num:4,
            title:"预警任务",
            color:'#FFCCC7'
          },
          {
            num:4,
            title:"超期任务",
            color:'#A36C67'
          }
        ]
      }
    },
    methods:{
      goBack() {
        this.$router.back()
      },
      changeTab(index) {
        this.selectedTab = index;
      }
    }
  }
</script>
<!--
  1.rbg(89,196,196)  #59C4C4
  2.rbg(147,210,243) #93D2F3
  3.rbg(244,206,152) #F4CE98
  4.rbg(255,204,199) #FFCCC7
  5.rbg(163,108,103) #A36C67
 -->
<style lang="less" scoped>
.header {
  p {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    line-height: 1px;
    margin-top: -10px;
  }
  .span {
    display: block;
    width: 100%;
    height: 30px;
    border-bottom: 1.5px dashed #ccc;
    color: rgb(172, 173, 182);
    padding-left: 10px;
  }
}

.content {
   ul {
      cursor: pointer;
      list-style: none;
      padding: 0px;
      margin-bottom: 4px;
      display: flex;
      justify-content: center;
      font-size: 16px;
      font-weight: bold;
   }
   ul li:nth-child(0) {
     margin-left: 0px;
   }
   ul li {
     margin-left: 50px;
   }
   .active {
    // 77 192 245
    border-bottom: 3px solid rgb(63, 128, 244);
    border-radius: 1px;
    // padding: 0px 6px;
    // 63 128 244
    color: rgb(63, 128, 244);
    transition: color 0.3s ease, border-bottom 0.3s ease;
  }
}
/deep/ .el-card__body, .el-main {
    padding: 5px 0px 0px 0px;
}
</style>


